url = 'https://www.acwing.com/problem/content/4876/'

x1,y1 = map(int,input().split())
x2,y2 = map(int,input().split())


print(max(abs(x1-x2),abs(y1-y2)))